package com.lzh.persevere.controller;

import com.lzh.persevere.common.R;
import com.lzh.persevere.common.ResultUtil;
import com.lzh.persevere.model.ro.comment.DislikeCommentRO;
import com.lzh.persevere.service.DislikeInfoService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * 点踩controller
 *
 * @author luzhiheng
 * @since 2025-07-14
 */
@RestController
@RequestMapping("/dislikeInfo")
public class DislikeInfoController {

    @Resource
    private DislikeInfoService dislikeInfoService;

    @ApiOperation(value = "点踩评论")
    @PostMapping("/dislikeComment")
    public R<Boolean> likeComment(@Valid @RequestBody DislikeCommentRO ro) {
        return ResultUtil.success(dislikeInfoService.dislikeComment(ro));
    }

}
